package com.vcredit.creditcat.enumtype.hl;

public enum HlOccupationEnum {

	 COMPANY_EMPLOYEE(1,"JOBONLINE/SHANGBANZU", "公司职员"),
	 FACTORY_WORKER(2,"JOBONLINE/SHANGBANZU", "工厂职工"), 
	 COURIER(4, "JOBONLINE/SHANGBANZU","快递员"), 
	 BARBER(5, "JOBONLINE/SHANGBANZU","理发师"), 
	 LAWYER(6, "JOBONLINE/SHANGBANZU","律师"),
	 DRIVER(7,"JOBONLINE/SHANGBANZU", "司机"), 
	 COOK(8, "JOBONLINE/SHANGBANZU","厨师"), 
	 CIVIL_SERVANT(9, "JOBONLINE/QITA","公务员或事业单位职员"),
	 PRIVATE_OWNER(10, "JOBONLINE/QIYEZHU","私营业主"), 
	 BUSINESS_BOSS(11, "JOBONLINE/SIYINGYEZHU","企业老板"), 
	 OTHER(12,"JOBONLINE/QITA", "其他");
	
	
	private Integer code;
	private String value;
	private String desc;

	private HlOccupationEnum(Integer code, String value, String desc) {
		this.code = code;
		this.desc = desc;
		this.value = value;
	}

	public Integer getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public static String getCodeByDesc(String desc) {
		for (HlOccupationEnum c : HlOccupationEnum.values()) {
			if (c.getDesc().equals(desc)) {
				return c.value;
			}
		}
		return OTHER.value;
	}
}
